const Mock = require('mockjs')

const data = Mock.mock({
  'items|10': [{
    id: '@increment',
    num: '@integer(20202000, 20204000)',
    'Account|1': ['test'

    ],
    'state|1': ['已关闭',
      '待发货',
      '已发货'
    ],
    'imgUrl|1': ['https://img.alicdn.com/imgextra/https://img.alicdn.com/imgextra/i4/2206860562597/O1CN01wZzp6B1V3THD3caJg_!!2206860562597.jpg_430x430q90.jpg',
      'http://img.alicdn.com/bao/uploaded/O1CN015HCM9x1MdoA9syHrO_!!99531458.jpg_300x300.jpg',
      'https://g-search1.alicdn.com/img/bao/uploaded/i4/i1/6000000004340/O1CN01wav1BV1hvlggpp1rw_!!6000000004340-0-picassoopen.jpg_250x250.jpg_.webp'
    ],
    graduate_time: '@datetime',
    price: '￥@integer(100, 150)',
    'pay|1': ['未支付', '微信', '支付宝'],
    source: 'App订单',

    number: '@integer(1, 10)',
    numberOrder: 'R@integer(20240001,20242999)'

  }]
})

module.exports = [{
  url: '/vue-admin-template/orders/list',
  type: 'get',
  response: () => {
    const items = data.items
    return {
      code: 20000,
      data: {
        total: items.length,
        items: items
      }
    }
  }
}]
